- var pageCount = parseInt((total + pageSize - 1) / pageSize)

.page-mod
    .result 共#{total}条数据,分#{pageCount}页,每页显示#{pageSize}条
    nav.text-right
        ul.pagination
            - if (pageIndex == 1){
                li.prev.disabled 
                    a 首页
                li.prev.disabled 
                    a &nbsp;&lt;
            - } else {
                 li.prev 
                    a(href='#{url}pageIndex=1',data-page='1')  首页
                li.prev 
                    a(href='#{url}pageIndex=#{pageIndex-1}',data-page='#{pageIndex-1}') &nbsp;&lt;
            - }

            - var start = 1
            if (pageIndex > 4)
                -  start=(pageIndex - 1)
                li
                    a(href='#{url}pageIndex=1',data-page='1')
                li
                    a(href='#{url}pageIndex=2',data-page='2') 
                li
                    a ...

            - var end = (pageIndex + 1)
            if (end > pageCount)
                -  end=pageCount

            - for (var i = start; i <= end; ++i) {
                if(pageIndex==i)
                    li.active
                        a #{i}
                else
                    li 
                        a(href='#{url}pageIndex=#{i}',data-page='#{i}') #{i}
            - }

            if (end < pageCount - 2)
                li.disabled
                    a &hellip;

            if (end < pageCount - 1)
                li.disabled
                    a(href='#{url}pageIndex=#{pageCount-1}',data-page='#{pageCount-1}') &nbsp;&lt;

            - if (pageIndex == pageCount){
                li.prev.disabled 
                    a &gt;&nbsp;
                li.prev.disabled 
                    a 末页
            -  }else{
                 li.prev 
                    a(href='#{url}pageIndex=#{pageIndex+1}',data-page='#{pageIndex+1}') &gt;&nbsp;
                 li.prev 
                    a(href='#{url}pageIndex=#{pageCount}',data-page='#{pageCount}') 末页
            - }